package com.lanju.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "lj_check_list")
public class HouseCheckList implements Serializable {

	private static final long serialVersionUID = -1600219019264329257L;

	private String checkId;
	private String houseId;
	private String userId;
	private Date createTime;
	private String chargeUserId;
	private String listName;
	private String houseAddress;
	private String dealTime;
	private String remark;
	private String checkType;
	
	private Set<HouseCheckListItem> houseCheckListItemSet;
	
	
	@Id
	@Column(name="checkId",unique=true,nullable=false)
	public String getCheckId() {
		return checkId;
	}

	public void setCheckId(String checkId) {
		this.checkId = checkId;
	}

	public String getHouseId() {
		return houseId;
	}

	public void setHouseId(String houseId) {
		this.houseId = houseId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getChargeUserId() {
		return chargeUserId;
	}

	public void setChargeUserId(String chargeUserId) {
		this.chargeUserId = chargeUserId;
	}

	public String getListName() {
		return listName;
	}

	public void setListName(String listName) {
		this.listName = listName;
	}

	public String getHouseAddress() {
		return houseAddress;
	}

	public void setHouseAddress(String houseAddress) {
		this.houseAddress = houseAddress;
	}

	public String getDealTime() {
		return dealTime;
	}

	public void setDealTime(String dealTime) {
		this.dealTime = dealTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getCheckType() {
		return checkType;
	}

	public void setCheckType(String checkType) {
		this.checkType = checkType;
	}
	@JsonIgnore
	@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER, mappedBy="houseCheckList")
	public Set<HouseCheckListItem> getHouseCheckListItemSet() {
		return houseCheckListItemSet;
	}

	public void setHouseCheckListItemSet(Set<HouseCheckListItem> houseCheckListItemSet) {
		this.houseCheckListItemSet = houseCheckListItemSet;
	}

}
